import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [ 
    {
      path: '/',
      redirect: '/echarts'
    },
    {
      path: '/',
      name: 'home',
      component: () => import('../views/home/index.vue'),
      children: [
        {
          path: '/echarts',
          name: 'echarts',
          component: () => import('../views/maps/echarts/index.vue')
        },
        {
          path: '/gaode',
          name: 'gaode',
          component: () => import('../views/maps/gd/index.vue')
        },
        {
          path: '/baidu',
          name: 'baidu',
          component: () => import('../views/maps/bd/index.vue')
        }
      ]
    },
    
  ]
})

export default router
